package com.chenfan.mcn.model.vo;

import com.chenfan.mcn.enums.ExcutionApprovalStatusEnum;
import lombok.Data;

import java.util.Date;
import java.util.Objects;

/**
 * @Author liuyang
 * @Date 2021/3/19
 * @Time 16:05
 * @Version V1.0
 **/
@Data
public class StarExecutionVO {

    /**
     * 执行单id
     */
    private Long id;

    /**
     * 执行单编号
     */
    private String excuteCode;

    /**
     * 执行人id
     */
    private Long excutorId;

    /**
     * 执行人名称
     */
    private String excutorName;

    /**
     * 执行单名称
     */
    private Integer type;

    /**
     * 创建日期
     */
    private Date createDate;

    /**
     * 单据状态
     */
    private Integer approvalStatus;

    private Long flowId;

    private String flowStatusName;

    private String approvalStatusName;

    private String starNickName;

    private String platformName;

    public String getApprovalStatusName() {
        if (Objects.nonNull(getApprovalStatus())) {
            return ExcutionApprovalStatusEnum.getStatusName(getApprovalStatus());
        }
        return null;
    }

}
